/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-12-12
 * Time:18:50
 */
public class EJavaGuruStringBuilder {
    public static void main(String args[]) {

        StringBuilder ejg = new StringBuilder(10 + 2 + "SUN" + 4 + 5);//从左自右相加，当与字符串相加时，这个加号就变成了拼接

        System.out.println(ejg);

        ejg.append(ejg.delete(3, 6));
        //append()将添加指定的内插字符串追加到此实例，并返回当前对象自身
        //delete删除的是下标3到小标6的元素

        System.out.println(ejg);

    }
}
